package com.eastfair.venueservice.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.venueservice.enumeration.ReportVenueDrawingCategoryAuditHistoryAuditStatusEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 一键报馆图纸分类审核记录历史
 * </p>
 *
 * @author dq
 * @since 2022-10-28
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("vsm_report_venue_drawing_category_audit_history")
@ApiModel(value = "ReportVenueDrawingCategoryAuditHistory", description = "一键报馆图纸分类审核记录历史")
@AllArgsConstructor
public class ReportVenueDrawingCategoryAuditHistory extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 一键报馆编号
     */
    @ApiModelProperty(value = "一键报馆编号")
    @Size(max = 64, message = "一键报馆编号长度不能超过64")
    @TableField(value = "report_venue_space_number", condition = LIKE)
    @Excel(name = "一键报馆编号")
    private String reportVenueSpaceNumber;

    /**
     * 一键报馆ID
     */
    @ApiModelProperty(value = "一键报馆ID")
    @TableField(value = "report_venue_space_id")
    @Excel(name = "一键报馆ID")
    private Long reportVenueSpaceId;

    /**
     * 一键报馆审核ID
     */
    @ApiModelProperty(value = "一键报馆审核ID")
    @TableField(value = "report_venue_space_audit_id")
    @Excel(name = "一键报馆审核ID")
    private Long reportVenueSpaceAuditId;

    /**
     * 一键报馆图纸分类审核ID
     */
    @ApiModelProperty(value = "一键报馆图纸分类审核ID")
    @TableField(value = "report_venue_space_drawing_category_audit_id")
    @Excel(name = "一键报馆图纸分类审核ID")
    private Long reportVenueSpaceDrawingCategoryAuditId;

    /**
     * 图片分类ID
     */
    @ApiModelProperty(value = "图片分类ID")
    @TableField(value = "drawing_category_id")
    @Excel(name = "图片分类ID")
    private Long drawingCategoryId;

    /**
     * 图片分类名称
     */
    @ApiModelProperty(value = "图片分类名称")
    @Size(max = 100, message = "图片分类名称长度不能超过100")
    @TableField(value = "drawing_category_name", condition = LIKE)
    @Excel(name = "图片分类名称")
    private String drawingCategoryName;

    /**
     * 图纸类型
     */
    @ApiModelProperty(value = "图纸类型")
    @Size(max = 5, message = "图纸类型长度不能超过5")
    @TableField(value = "drawing_category_type", condition = LIKE)
    @Excel(name = "图纸类型")
    private String drawingCategoryType;

    /**
     * 图片分类序号
     */
    @ApiModelProperty(value = "图片分类序号")
    @TableField(value = "drawing_category_sort")
    @Excel(name = "图片分类序号")
    private Integer drawingCategorySort;

    /**
     * 审核状态 #{SUBMIT:待审核;APPROVED:审核通过;NOT_APPROVED:审核未通过}
     */
    @ApiModelProperty(value = "审核状态 #{SUBMIT:待审核;APPROVED:审核通过;NOT_APPROVED:审核未通过}")
    @TableField(value = "audit_status")
    @Excel(name = "审核状态 #{SUBMIT:待审核;APPROVED:审核通过;NOT_APPROVED:审核未通过}", replace = {"待审核_SUBMIT", "审核通过_APPROVED", "审核未通过_NOT_APPROVED",  "_null"})
    private ReportVenueDrawingCategoryAuditHistoryAuditStatusEnum auditStatus;

    /**
     * 审核意见
     */
    @ApiModelProperty(value = "审核意见")
    @Size(max = 200, message = "审核意见长度不能超过200")
    @TableField(value = "audit_opinion", condition = LIKE)
    @Excel(name = "审核意见")
    private String auditOpinion;

    /**
     * 提交时间
     */
    @ApiModelProperty(value = "提交时间")
    @TableField(value = "report_time")
    @Excel(name = "提交时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime reportTime;

    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    @TableField(value = "audit_time")
    @Excel(name = "审核时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime auditTime;

    /**
     * 审核人id
     */
    @ApiModelProperty(value = "审核人id")
    @TableField(value = "audit_user_id")
    @Excel(name = "审核人id")
    private Long auditUserId;

    /**
     * 审核人姓名
     */
    @ApiModelProperty(value = "审核人姓名")
    @Size(max = 100, message = "审核人姓名长度不能超过100")
    @TableField(value = "audit_user_name", condition = LIKE)
    @Excel(name = "审核人姓名")
    private String auditUserName;


    @Builder
    public ReportVenueDrawingCategoryAuditHistory(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    String reportVenueSpaceNumber, Long reportVenueSpaceId, Long reportVenueSpaceAuditId, Long reportVenueSpaceDrawingCategoryAuditId, Long drawingCategoryId, String drawingCategoryName, 
                    String drawingCategoryType, Integer drawingCategorySort, ReportVenueDrawingCategoryAuditHistoryAuditStatusEnum auditStatus, String auditOpinion, LocalDateTime reportTime, LocalDateTime auditTime, 
                    Long auditUserId, String auditUserName) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.reportVenueSpaceNumber = reportVenueSpaceNumber;
        this.reportVenueSpaceId = reportVenueSpaceId;
        this.reportVenueSpaceAuditId = reportVenueSpaceAuditId;
        this.reportVenueSpaceDrawingCategoryAuditId = reportVenueSpaceDrawingCategoryAuditId;
        this.drawingCategoryId = drawingCategoryId;
        this.drawingCategoryName = drawingCategoryName;
        this.drawingCategoryType = drawingCategoryType;
        this.drawingCategorySort = drawingCategorySort;
        this.auditStatus = auditStatus;
        this.auditOpinion = auditOpinion;
        this.reportTime = reportTime;
        this.auditTime = auditTime;
        this.auditUserId = auditUserId;
        this.auditUserName = auditUserName;
    }

}
